package com.myproject;

import java.util.concurrent.locks.ReentrantLock;

public class Test {

    public static void main(String[] args) {

        Object object = new Object();

        synchronized (object){
            System.out.println("hello");
        }

        ReentrantLock lock = new ReentrantLock();
        lock.lock();
        lock.unlock();

    }
}
